package rc.alfresco.users.dao;

import org.apache.ibatis.session.SqlSession;
import rc.alfresco.users.dto.RcUserTEO;

/**
 * Created by IntelliJ IDEA.
 * User: Slejus
 * Date: 13.11.26
 * Time: 13.42
 * To change this template use File | Settings | File Templates.
 */
public class RcUserDaoIbatis implements RcUserDao
{
    @Override
    public RcUserTEO getUserByAmnId(Integer amnId, SqlSession session) {
        RcUserTEO user;
        try {
            user = session.selectOne("user.getUserByAmnId", amnId);
        } finally {
            session.close();
        }
        if (user != null) return user;
        else return null;
    }
}
